Content-Type text.html for DirectoryIndex (1.3.x)
am 25.01.2010 02:27:54 von christos.jonathan.hayward
--0016e64095d417d350047df314d8
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
I am getting an error in my log if I visit
http://jonathanscorner.com/admin/but not
http://jonathanscorner.com/admin/index.html under Apache 1.3.x. The two
URL's serve up the same file; on a visit to
http://jonathanscorner.com/admin/ , DirectoryIndex pulls up the same
index.html (that directory has no index.cgi/index.php/etc.). The message
logged is:
[warn] Cannot get media type from 'text.html'
Is there any way in httpd.conf or .htaccess that I can get
DirectoryIndex-served files to be assigned Content-Type "text/html" and not
"text.html"? I haven't had success with variants on
AddType text/html
because AddType requires a second argument, an extension, and neither "" no=
r
* nor an omitted extension will match a directory with a trailing slash and
no extension.
Is there any way that DirectoryIndex-served files can be specified to be
text/html?
--=20
â=92 Jonathan Hayward, christos.jonathan.hayward@gmail.com
â=92 An Orthodox Christian author: theology, literature, et cetera.
â=92 My award-winning collection is available for free reading online:
â=A9 I invite you to visit my main site at http://JonathansCorner.com/
--0016e64095d417d350047df314d8
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
I am getting an error in my log if I visit
r.com/admin/">http://jonathanscorner.com/admin/ but not
://jonathanscorner.com/admin/index.html">http://jonathanscor ner.com/admin/i=
ndex.html under Apache 1.3.x. The two URL's serve up the same file;=
on a visit to http://jonatha=
nscorner.com/admin/ , DirectoryIndex pulls up the same index.html (that=
directory has no index.cgi/index.php/etc.). The message logged is:
[warn] Cannot get media type from 'text.html'
Is there a=
ny way in httpd.conf or .htaccess that I can get DirectoryIndex-served file=
s to be assigned Content-Type "text/html" and not "text.html=
"? I haven't had success with variants on
<FilesMatch "^.*/$">
AddType text/html
</Files=
Match>
because AddType requires a second argument, =
an extension, and neither "" nor * nor an omitted extension will =
match a directory with a trailing slash and no extension.
Is there any way that DirectoryIndex-served files can be specified to b=
e text/html?
--
â=92 Jonathan Hayward,
ristos.jonathan.hayward@gmail.com">christos.jonathan.hayward @gmail.com<=
br>â=92 An Orthodox Christian author: theology, literature, et cetera.=
â=92 My award-winning collection is available for free reading online:=
â=A9 I invite you to visit my main site at
hansCorner.com/">http://JonathansCorner.com/
--0016e64095d417d350047df314d8--
Re: Content-Type text.html for DirectoryIndex (1.3.x)
am 25.01.2010 06:19:34 von christos.jonathan.hayward
I've found a partial workaround for this.
I commented out:
#RewriteRule ^/index.html$ / [R=3D301,L]
And wrote another RewriteRule:
RewriteRule ^(.*/)$ $1index.html [L]
The same URL is displayed; load http://jonathanscorner.com/admin/ and
the URL displayed in the browser window is the URL you typed in. But
besides the scenes it pulls the index.html file and sidesteps
DirectoryIndex before DirectoryIndex can assign a Content-Type of
"text.html" (or anything else).
N.B. I modified this to:
RewriteRule ^/psalms/$ /psalms/index.cgi [L]
RewriteRule ^(.+/)$ $1index.html [L]
as most directories have an index.html, but
http://jonathanscorner.com/ and http://jonathanscorner.com/psalms/ use
an index.cgi. As a later modification I moved the latter rule to the
end of the RewriteRules for that host, as it was preventing rewrites
from an old directory to a new directory.
I now can load URLs either like http://jonathanscorner.com/psalms/
(index.cgi) or http://jonathanscorner.com/dream/ (index.html) and have
the same browser behavior, but when I load it I don't get the
text.html warning in my error log.
So far since restarting I haven't seen any further text.html warnings.
I'd love to be able to fix the problem properly and at its source...
On Sun, Jan 24, 2010 at 7:27 PM, Jonathan Hayward
wrote:
>
> I am getting an error in my log if I visit http://jonathanscorner.com/adm=
in/ but not http://jonathanscorner.com/admin/index.html under Apache 1.3.x.=
The two URL's serve up the same file; on a visit to http://jonathanscorner=
..com/admin/ , DirectoryIndex pulls up the same index.html (that directory h=
as no index.cgi/index.php/etc.). The message logged is:
>
> [warn] Cannot get media type from 'text.html'
>
> Is there any way in httpd.conf or .htaccess that I can get DirectoryIndex=
-served files to be assigned Content-Type "text/html" and not "text.html"? =
I haven't had success with variants on
>
>
> AddType text/html
>
>
> because AddType requires a second argument, an extension, and neither "" =
nor * nor an omitted extension will match a directory with a trailing slash=
and no extension.
>
> Is there any way that DirectoryIndex-served files can be specified to be =
text/html?
>
> --
> â=92 Jonathan Hayward, christos.jonathan.hayward@gmail.com
> â=92 An Orthodox Christian author: theology, literature, et cetera.
> â=92 My award-winning collection is available for free reading onlin=
e:
> â=A9 I invite you to visit my main site at http://JonathansCorner.co=
m/
--
â=92 Jonathan Hayward, christos.jonathan.hayward@gmail.com
â=92 An Orthodox Christian author: theology, literature, et cetera.
â=92 My award-winning collection is available for free reading online:
â=A9 I invite you to visit my main site at http://JonathansCorner.com/
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Content-Type text.html for DirectoryIndex (1.3.x)
am 27.01.2010 17:27:44 von Matus UHLAR - fantomas
On 24.01.10 19:27, Jonathan Hayward wrote:
> I am getting an error in my log if I visit
> http://jonathanscorner.com/admin/but not
> http://jonathanscorner.com/admin/index.html under Apache 1.3.x. The two
> URL's serve up the same file; on a visit to
> http://jonathanscorner.com/admin/ , DirectoryIndex pulls up the same
> index.html (that directory has no index.cgi/index.php/etc.). The message
> logged is:
>
> [warn] Cannot get media type from 'text.html'
you apparently have misconfigured something, apache thinks the type is
text.html instead of text/html. check configs and .htaccess files.
> Is there any way in httpd.conf or .htaccess that I can get
> DirectoryIndex-served files to be assigned Content-Type "text/html" and not
> "text.html"?
The directory index is mapped to a file and the file is processed as it type
defines. fot .html it should be text/html.
--
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
10 GOTO 10 : REM (C) Bill Gates 1998, All Rights Reserved!
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org